﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using RESTServices.Dominio;
using System.Data.SqlClient;

namespace RESTServices
{
   
    [ServiceContract]
    public interface IPeliculas
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Peliculas", ResponseFormat = WebMessageFormat.Json)]
        Pelicula CrearPelicula(Pelicula peliculaCrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Peliculas/{idpelicula}", ResponseFormat = WebMessageFormat.Json)]
        Pelicula ObtenerPelicula(string idpelicula);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Peliculas", ResponseFormat = WebMessageFormat.Json)]
        Pelicula ModificarPelicula(Pelicula peliculaModificar);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Peliculas/{idpelicula}", ResponseFormat = WebMessageFormat.Json)]
        void EliminarPelicula(string idpelicula);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Peliculas/", ResponseFormat = WebMessageFormat.Json)]
        List<Pelicula> ListarPeliculas();
    }
}
